<?php
apf_require_class("Security_AES");
class Security_Api_Crypt_key extends Security_AES{

    private static $instance;
    public static function get_instance() {
        if (!self::$instance) {
            self::$instance = new self();
        }
        return self::$instance;
    }

    public function encrypt($salary,$key,$bits = 256) {
        return parent::AESEncryptCtr($salary, $key, $bits);
    }

    public function decrypt($enkey,$key,$bits = 256) {
        return parent::AESDecryptCtr($enkey, $key, $bits);
    }

    public function decrypt_test($enkey = 'ap7UUDQ0NDQ9XMr6vJf7dDIwCxxmt9Y3z6Ci4hqRI47ehoX742Pp4Q==',$key='cdikuwV0',$bits = 256) {
        echo parent::AESDecryptCtr($enkey, $key, $bits);
    }
}